// ignore_for_file: file_names

import 'package:flutter/material.dart';

class MyApp3 extends StatelessWidget {
  const MyApp3(
      {super.key,
      this.title = '',
      this.content = '',
      this.textCol = Colors.black,
      this.textSize = 0});

  final String title;
  final String content;
  final Color textCol;
  final double textSize;
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.orange,
          toolbarHeight: 100,
          title: Center(
            child: Text(
              '$title ',
              style: const TextStyle(color: Colors.white, fontSize: 50),
            ),
          ),
        ),
        body: const MyContainer(),
      ),
    );
  }
}

class MyContainer extends StatelessWidget {
  const MyContainer({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: MediaQuery.of(context).size.width,
      height: 200,
      // color和decoration不能同时给
      // color: Colors.red,
      padding: const EdgeInsets.all(20),
      decoration: BoxDecoration(
          color: Colors.green,
          border: Border.all(width: 25, color: Colors.blue)),
      child: const Text(
        '这是里面文本组件',
        style: TextStyle(color: Colors.white, fontSize: 50),
      ),
    );
  }
}
